# coding: UTF-8
# ----------
# Project_Name : pythonProject
# File_Name : huangcongbing
# Author : asus
# Date_Time:2022/4/25 14:58
# Description :
# ----------
import unittest
from selenium import webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from  po.page.index_page import IndexPage   #导入首页类


class Index001(unittest.TestCase):
    def setUp(self) -> None:
        self.driver = webdriver.Chrome()
        self.wait  = WebDriverWait(self.driver,30)

        #生成首页类对象
        self.index_page = IndexPage(self.driver,self.wait)

    def test(self):
        self.driver.get('http://www.baidu.com/')
        self.driver.maximize_window()

        self.index_page.input_search_box('51放假安排')
        self.index_page.click_search_button()
        time.sleep(5)

    def tearDown(self) -> None:
        self.driver.quit()